﻿using System.Web;

public class UserDataHandler
{
    public string GetCurrentUserName()
    {
        string[] splittedCurrentUserName = HttpContext.Current.User.Identity.Name.Split('\\');
        return splittedCurrentUserName[1];
    }

    public bool CheckAccessRights(Album album)
    {
        string albumCreatorName = album.Author;

        return (GetCurrentUserName() == albumCreatorName);
    }
    
}
